#!/bin/bash

dir="$1"

if [ ! -d "$dir" ]; then
  echo "目录不存在"
  exit 1
fi

find "$dir" -type f -name "*.c" | while read file; do
    ls -l "$file"
done
